﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RussiansPeasentsMultiplication
{
    class Program
    {
        static int russianMultiplication(int a, int b)
        {
            int x = a;
            int y = b;
            int z = 0;
            while (x > 0)
            {
                if (x % 2 == 1)
                {
                    z += y;
                }
                y <<= 1;
                x >>= 1;
            }
            return z;
        }
        static void Main(string[] args)
        {
            Console.WriteLine(russianMultiplication(10,0));

        }
    }
}
